import { ref } from "vue";
import { defineStore } from "pinia";

export const useTokenStore = defineStore(
    "token",
    () => {
        const token = ref(null);
        const updateToken = (val) => { token.value = val; }
        const removeToken = () => { token.value = null; }
        return { token, updateToken, removeToken }
    }, {
        persist: true,
    }

);